package com.jian.java.controller;

import com.jian.java.bean.Person;
import com.jian.java.bean.User;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
import org.springframework.context.annotation.Conditional;
import org.springframework.context.annotation.Import;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author Jiange
 * @create 2021-04-26-14:04
 */

/**
 * ResponseBody
 * Controller
 */
@Slf4j
@RestController
public class MyController {

    @Autowired
    private Person person;

    @GetMapping("/person")
    public Person person(){
        log.info("请求进来了");
        return person;
    }

    @GetMapping("/hello")
    public String handler(@RequestParam("name") String a){
        return "建哥最帅"+a;
    }
}
